# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=riot-web
pkgver=1.11.0
pkgrel=0
pkgdesc="A glossy Matrix collaboration client for the web"
url="https://riot.im/"
arch="noarch"
options="!check"
license="Apache-2.0"
source="https://github.com/vector-im/element-web/releases/download/v$pkgver/element-v$pkgver.tar.gz"
builddir="$srcdir/element-v$pkgver"

# secfixes:
#   1.9.7-r0:
#     - CVE-2021-44538
#   1.8.4-r0:
#     - CVE-2021-40823
#     - CVE-2021-40824

build() {
	return 0
}

package() {
	mkdir -p "$pkgdir"/usr/share/webapps \
		"$pkgdir"/etc/riot-web
	cp -r "$builddir" "$pkgdir"/usr/share/webapps/riot-web
	mv "$pkgdir"/usr/share/webapps/riot-web/config.sample.json \
		"$pkgdir"/etc/riot-web
	ln -sf /etc/riot-web/config.json \
		"$pkgdir"/usr/share/webapps/riot-web/config.json
}

sha512sums="
8cdfaef81e825d6849bd6371fb167d2178a091f4c5b7fa1787464dd3b979b2b4402fb327e52d9c46244fc02172878c5ad1ae954c32f0c491c11a5f9822a456d7  element-v1.11.0.tar.gz
"
